from django.db import models
'''
python3 manage.py migrate   # 创建表结构
$ python3 manage.py makemigrations appname  # 让 Django 知道我们在我们的模型有一些变更
$ python3 manage.py migrate appname   # 创建表结构
'''


class Tango(models.Model):
    tango = models.CharField(max_length=20, unique=True)
    mean = models.CharField(max_length=50)
    unit = models.IntegerField()

    def delete_everything(self):
        Tango.objects.all().delete()
